#ifndef __BASIS_FUNCTION_HH__
#define __BASIS_FUNCTION_HH__
#include <iostream>
#include <math.h>
#include <string.h>
#include "../../includes/setting.hh"

class BasisFunction{
public:
  BasisFunction();
  virtual ~BasisFunction();
  void getInitComponent();
  void getDBasisLeft(double dbl[]);
  void getDBasisRight(double dbr[]);
  void getDBasisMiddle(double dbm[]);
  void getBasisLeft(double bl[]);
  void getBasisRight(double br[]);
  void getBasisMiddle(double bm[]);
  
  void getVarLeft(int i,double varl[]);
  void getVarRight(int i,double varr[]);  
  void getVarMiddle(int i,double varm[]);
  void getOnePhyLeft(int i,int phyi,double varl[]);
  void getOnePhyRight(int i,int phyi,double varr[]);  
  void getOnePhyMiddle(int i,int phyi,double varm[]);    

  void getBasis(double binside[]);
private:
  //double toxi(double x, double xcenter, double pillarlen);
  double legendreP(double xi, int n);
  double dlegendreP(double xi, int n);
};
#endif
